#pragma once
#include "nodes\Node.h"
#include <string>
#include "base\Controller.h"
#include "EventManager.h"
#include "utils\Log.h"
#include <vector>
#include "utils\mtrand.h"
#include "addons\ScreenQuad.h"
#include "nodes\DynamicSpriteNode.h"
#include "..\effects\BulletSystem.h"
#include "..\actors\Ship.h"
#include "..\..\GameCore.h"
#include "..\effects\Starfield.h"
#include "..\actors\Asteroids.h"
#include "..\effects\Background.h"

class RunState : public ds::GameState, ds::EventHandler,public ds::KeyboardController, 	public ds::MouseController {

public:
	RunState(std::string name);
	virtual ~RunState();
	bool loadContent(ds::ResManager& resourceManager);	
	bool update(float elapsedTime);	
    bool onActivation();
    bool onDeactivation();	
	void OnKeyDown( WPARAM wParam ) {}
	void OnKeyUp( WPARAM wParam ) {}
	void OnChar(char ascii,unsigned int keyState);
	//
	void process(ds::EventBuffer& buffer);
	// 
	void OnButtonDown(int button);
	void OnButtonUp(int button);
private:		
	void handlePowerup(const char* name);
	GameCore* m_Core;
};

